/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.cursojava.client;

import com.extjs.gxt.ui.client.event.BaseEvent;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;

/**
 *
 * @author p1520009
 */
public class ConBaseGWT extends BaseGWT {
    private Button btnNovo = new Button("Novo", ICONES.ICONS.newReg());
    private ToolBar tbTopo = new ToolBar();
    public ConBaseGWT() {
        setHeaderVisible(false);
        getCpCentro().setHeaderVisible(false);
        getCpLeste().setVisible(false);
        getCpNorte().setVisible(false);
        getCpOeste().setVisible(false);
        getCpSul().setVisible(false);

        btnNovo.addListener(Events.OnClick, new Listener<ButtonEvent>() {

            @Override
            public void handleEvent(ButtonEvent be) {
                novo();
            }
        });

        getCpCentro().setTopComponent(tbTopo);
        tbTopo.add(btnNovo);
    }

    public void novo() {

    }

    /**
     * @return the btnNovo
     */
    public Button getBtnNovo() {
        return btnNovo;
    }

    /**
     * @return the tbTopo
     */
    public ToolBar getTbTopo() {
        return tbTopo;
    }
}

